package czx.drools.common.log;

/**
 * @Description: TODO
 * @author: chenzx
 * @date: 2023/12/21 17:27
 */
public class LogBean {

    public static final int DEBUG = 10000;
    public static final int INFO = 20000;
    public static final int WARN = 30000;
    public static final int ERROR = 40000;
    public static final int FATAL = 50000;
    private String type;

    private String opName;
    private Object message;
    private int Level;
    public LogBean(int level, String type, Object message) {
        this.type = type;
        this.Level = Level;
        this.message = message;
    }

    public void setLevel(int level) {
        Level = level;
    }

    public void setMessage(Object message) {
        this.message = message;
    }

    public void setOpName(String opName) {
        this.opName = opName;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getLevel() {
        return Level;
    }

    public Object getMessage() {
        return message;
    }

    public String getOpName() {
        return opName;
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        StringBuffer buffer = new StringBuffer("logType=");
        buffer.append(this.type);
        if (this.opName != null) {
            buffer.append(";opName=").append(this.opName);
        } else {
            buffer.append(";message=").append(this.message);
        }
        return buffer.toString();
    }
}

